import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import Team from '@/components/team/TeamList'
import leagues from '@/components/team/leagues'
import scrolls from '@/components/public/scrolls'
import header from '@/components/public/header'
import addCommodity from '@/components/back/team/AddCommodity'
import addTeam from '@/components/back/team/addTeam'
import addUser from '@/components/front/user/addUser'
import testAddUser from '@/components/front/user/testAddUser'
import backUser from '@/components/back/user/'
import backAddUser from '@/components/back/user/addUser'
import backIndex from '@/components/back/index'
import schedule from '@/components/front/schedule'
import teacher from '@/components/back/teacher'
import mutilUpload from '@/components/back/teacher/mutilUpload'
import testJQ from '@/components/example/testJQ'
import frontStudent from '@/components/front/student'
import backActive from '@/components/back/active'
import frontActive from '@/components/front/active'
import login from '@/components/login'







Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: '  login',
      component:  login
    },

    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/Team',
      name: 'Team',
      component: Team
    },
    {
      path: '/leagues',
      name: 'leagues',
      component: leagues
    },
    {
      path: '/scrolls',
      name: 'scrolls',
      component: scrolls
    },
    {
      path: '/header',
      name: 'header',
      component: header
    },
    {
      path: '/addCommodity',
      name: 'addCommodity',
      component: addCommodity
    },
    {
      path: '/addTeam',
      name: 'addTeam',
      component: addTeam
    },
    {
      path: '/addUser',
      name: 'addUser',
      component: addUser
    },
    {
      path: '/testAddUser',
      name: 'testAddUser',
      component: testAddUser
    },
    // {
    //   path: '/back/team',
    //   name: 'backTeam',
    //   component: backTeam
    // },
    {
      path: '/back/user',
      name: 'backUser',
      component: backUser
    },
    {
      path: '/back',
      name: 'backIndex',
      component: backIndex,
      children: [
        {
          path: '/back/team',
          component: resolve => require(['@/components/back/team/'], resolve),
          meta: {title: '球队管理'}
        },
        ,
        {
          path: '/back/teacher',
          component: resolve => require(['@/components/back/teacher/'], resolve),
          meta: {title: '教师管理'}
        }
    ]
    },
    {
      path: '/front/schedule',
      name: 'schedule',
      component: schedule
    },
    {
      path: '/back/mutilUpload',
      name: 'mutilUpload',
      component: mutilUpload
    },
    {
      path: '/testJQ',
      name: 'testJQ',
      component: testJQ
    },
    {
      path: '/front/student',
      name: 'frontStudent',
      component: frontStudent
    },

    {
      path: '/back/active',
      name: 'backActive',
      component: backActive
    },

    {
      path: '/front/active',
      name: 'frontActive',
      component: frontActive
    },


  ]
})
